MAKE_PATH = routes

COFFEE = $(wildcard ${MAKE_PATH}/*.coffee)
CF_JS = $(wildcard ${MAKE_PATH}/*cf\.js)

T = $(patsubst %cf.js,%.js,$(CF_JS))

main: $(COFFEE)
	coffee -bc $(COFFEE)
	coffee -bc modules/*.coffee
	npm install
	cd public && \
	make


install: $(CF_JS)
	for name in $(CF_JS) ;\
	do\
		new=$$(echo $$name | sed 's/cf\.js/\.js/g');\
		mv $$name $$new;\
	done

clean: $(CF_JS)
	for name in $(CF_JS);\
	do\
		rm $$name ;\
	done


